﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace Utility.Ext
{
    public static class Extensions
    {
        public static string EncryptSha1(this string Content)
        {
            var hash = SHA1.Create();
            var encoder = new ASCIIEncoding();
            var combined = encoder.GetBytes(Content);
            hash.ComputeHash(combined);
            var rehash = Convert.ToBase64String(hash.Hash);
            return rehash;
        }
    }
}
